"use strict";
cc._RF.push(module, '63446rBEehM2Lvvji3ngkvb', 'DialogGamePassJS');
// src/DialogGamePassJS.js

"use strict";

var n = module.exports = {};
var t = module;

var i = require('GameDataManagerJS'),
    o = (require('define'), require('ShareManagerJS'));

require('AdsManagerJS');

cc.Class({
  "extends": cc.Component,
  properties: {
    m_dialog: cc.Node,
    m_dialog_bg: cc.Sprite,
    m_light_star: [cc.Sprite],
    m_next_btn: cc.Button,
    m_retry_btn: cc.Button,
    audioControl: {
      "default": null
    }
  },
  onLoad: function onLoad() {
    var e = cc.find("Canvas").getComponent(cc.Canvas);
    cc.winSize.width / cc.winSize.height <= (750 / 1334).designScreen ? (e.fitHeight = !1, e.fitWidth = !0) : (e.fitHeight = !0, e.fitWidth = !1),
    /*e.alignWithScreen(),*/
    this.audioControl = cc.find("AudioControlNode").getComponent("AudioSourceControl");
  },
  start: function start() {},
  submitScoreButtonFunc: function submitScoreButtonFunc(e) {
    cc.log("fail 提交得分 : " + e);
  },
  showDialog: function showDialog(e) {
    this.m_dialog.active = !0;

    for (var t = 0; t < e; t++) {
      this.m_light_star[t].node.opacity = 255;
    }
  },
  clickNextBtn: function clickNextBtn() {
    var e = i.getInstance().getGameCurLevelNum() + 1,
        t = i.getInstance().getLatestPackage();
    this.playClick(), e < i.getInstance().getStageCount(t) ? (i.getInstance().setGameCurLevelNum(e), cc.director.loadScene("game")) : cc.director.loadScene("ChooseStageScene");
  },
  clickRetryBtn: function clickRetryBtn() {
    this.playClick(), cc.director.loadScene("game");
  },
  clickShareBtn: function clickShareBtn() {
    this.playClick(), o.getInstance().onShareGame("sharePic");
  },
  playClick: function playClick() {
    this.audioControl && this.audioControl.playClick();
  }
});

cc._RF.pop();